Skip to content

docs(reference): use harper-config.yaml consistently in v5 - #661

Merged
Ethan-Arrowood merged 2 commits into
mainfrom
docs/v5-config-filename
Sep 2, 2026
Merged

docs(reference): use harper-config.yaml consistently in v5#661
Ethan-Arrowood merged 2 commits into
mainfrom
docs/v5-config-filename

Conversation

@Ethan-Arrowood

Copy link
Copy Markdown
Member

Problem

The v5 docs use both harper-config.yaml and the pre-v5 harperdb-config.yaml. Two pages contradicted each other about the same authentication config section:

Page Said
reference/resources/resource-api.md set authentication.enableSessions in harperdb-config.yaml
reference/security/jwt-authentication.md set authentication.operationTokenTimeout in harper-config.yaml

This is not cosmetic. HarperFast/skills generates agent-facing rules from these pages, and the generator is instructed to use only what the sources contain. The checking-authentication rule (HarperFast/skills#81) pulled both sections into one rule, so it now tells agents to set enableSessions in harperdb-config.yaml in one step and operationTokenTimeout in harper-config.yaml in another. It can only be fixed here, not in the generated file.

Which name is correct

harper-config.yaml. Verified against HarperFast/harper origin/main rather than inferred from the docs, since both spellings appear in them:

  • utility/hdbTerms.ts:9-11HDB_CONFIG_FILE = 'harperdb-config.yaml' is JSDoc'd "Old Harper Root Config File"; HARPER_CONFIG_FILE = 'harper-config.yaml' is "Harper Root Config File".
  • Every resolver prefers the new name, falling back to the old one only when the new file is absent — config/configUtils.ts:387-391 (getConfigFilePath), configUtils.ts:1005-1007 (set_configuration), bin/run.ts:212-214, utility/logging/harper_logger.ts:461-463.
  • All writes target the new nameconfigUtils.ts:286 (initial write), utility/install/installer.ts:459 (boot-props settings_path), and backups are named <timestamp>-harper-config.yaml.bak (configUtils.ts:1033).

The harperdb-config.yaml strings still scattered through the core source are legacy log/error text and comments, not the resolved filename.

Changes

Five occurrences in reference/, plus one in a v5 release note describing current behavior:

  • reference/resources/resource-api.mdenableSessions (the one feeding the skills rule)
  • reference/mcp/configuration.md — top-level mcp: block
  • reference/mcp/migration.md — comparison table + migration step
  • reference/mcp/cli.mdoperationsApi.network.domainSocket
  • release-notes/v5-lincoln/v5-migration.mdapplications section (v5 doc, current behavior — same bug, just outside reference/)

reference/security/jwt-authentication.md needed no change; it was already correct.

Also: a note in the configuration overview

With the legacy spelling now gone from every other v5 page, an instance upgraded from v4 that still has harperdb-config.yaml on disk had no signal anywhere in the v5 docs. Added a :::note to reference/configuration/overview.md stating the loader's actual behavior — prefers the new name, falls back, then writes later changes back to whichever file it found, and upgrading does not rename the file.

This is the one intentional remaining mention of the old name in reference/, and it is explicitly framed as legacy, so the skills generator gets a single authoritative statement instead of scattered inconsistent spellings.

Deliberately left alone

  • The whole reference_versioned_docs/version-v4/ tree (~30 occurrences) — correct for v4, and per AGENTS.md not to be modified for v5 work.
  • release-notes/v5-lincoln/5.0.md:24 — that line documents the rename itself.

Verification

  • npm run format:check — clean repo-wide.
  • npm run build — succeeds; 406 documents processed.
  • Confirmed in the built HTML that reference/v5/resources/resource-api and reference/v5/security/jwt-authentication now contain only harper-config.yaml, that all three MCP pages do too, and that reference/v4/configuration/overview is unchanged.

Follow-up for HarperFast/skills

Regenerating checking-authentication will fix HarperFast/skills#81, but reference/mcp/* also feeds agent rules, so that regeneration should cover more than the auth rule.


🤖 Generated with Claude Code

The v5 docs used both `harper-config.yaml` and the pre-v5
`harperdb-config.yaml`. Two pages contradicted each other outright:
`resources/resource-api.md` told readers to set
`authentication.enableSessions` in `harperdb-config.yaml` while
`security/jwt-authentication.md` put the sibling `authentication` token
timeouts in `harper-config.yaml`.

`harper-config.yaml` is the correct name. In HarperFast/harper,
`utility/hdbTerms.ts` labels `HDB_CONFIG_FILE` ('harperdb-config.yaml')
"Old Harper Root Config File" and `HARPER_CONFIG_FILE`
('harper-config.yaml') "Harper Root Config File". Every resolver prefers
the new name and falls back to the old one only when the new file is
absent (`config/configUtils.ts` getConfigFilePath and setConfigValue,
`bin/run.ts`, `utility/logging/harper_logger.ts`), and all writes target
the new name (`configUtils.ts` initial write, `installer.ts` boot-props
`settings_path`, and `<timestamp>-harper-config.yaml.bak` backups).

Replaces the five remaining occurrences in `reference/`, plus one in
`release-notes/v5-lincoln/v5-migration.md` that described current v5
module-loading behavior with the legacy name. `reference_versioned_docs/version-v4/`
is left alone, as is the 5.0 release note that documents the rename itself.

Also adds a note to `reference/configuration/overview.md`: with the legacy
spelling gone from every other v5 page, an instance upgraded from v4 that
still has `harperdb-config.yaml` on disk had no signal anywhere in the v5
docs. The note states the loader's actual behavior, including that
upgrading does not rename the file.

This fixes a docs-side bug that propagates into HarperFast/skills, which
generates agent-facing rules from these pages. The `checking-authentication`
rule (HarperFast/skills#81) pulled both sections into one rule, so it tells
agents to set `enableSessions` in `harperdb-config.yaml` in one step and
`operationTokenTimeout` in `harper-config.yaml` in another.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Ethan-Arrowood
Ethan-Arrowood requested a review from a team as a code owner September 2, 2026 14:11
@github-actions
github-actions Bot temporarily deployed to pr-661 September 2, 2026 14:14 Inactive
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-661

This preview will update automatically when you push new commits.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation to reflect the renaming of the configuration file from harperdb-config.yaml to harper-config.yaml in Harper v5, and adds a note explaining the fallback behavior for upgraded instances. The review feedback suggests rephrasing the fallback logic explanation in reference/configuration/overview.md to improve clarity and readability.

Comment thread reference/configuration/overview.md Outdated
Harper is configured through a [YAML](https://yaml.org/) file called `harper-config.yaml` located in the Harper root directory. By default the root directory is a folder named `hdb` in the home directory of the current user.

:::note Instances upgraded from v4
Before v5 this file was named `harperdb-config.yaml`, and that name is still supported. Harper looks for `harper-config.yaml` first and falls back to `harperdb-config.yaml` when only the older file is present, then writes later changes — including those made by `set_configuration` — back to whichever file it found. Upgrading does not rename the file, so an upgraded instance keeps its `harperdb-config.yaml` until you rename it. A fresh install always creates `harper-config.yaml`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved clarity, you could rephrase the fallback logic to be more direct. The current wording is a little dense and could be simplified.

Suggested change
Before v5 this file was named `harperdb-config.yaml`, and that name is still supported. Harper looks for `harper-config.yaml` first and falls back to `harperdb-config.yaml` when only the older file is present, then writes later changesincluding those made by `set_configuration`back to whichever file it found. Upgrading does not rename the file, so an upgraded instance keeps its `harperdb-config.yaml` until you rename it. A fresh install always creates `harper-config.yaml`.
Before v5 this file was named harperdb-config.yaml, and that name is still supported. Harper looks for harper-config.yaml first and falls back to harperdb-config.yaml if the new file is absent. Subsequent configuration changesincluding those made by set_configuration—are written back to whichever file was found. Upgrading does not rename the file, so an upgraded instance keeps its harperdb-config.yaml until you rename it. A fresh install always creates harper-config.yaml.

@kriszyp kriszyp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good
🤖 Reviewed with Codex

Comment thread reference/configuration/overview.md Outdated
Harper is configured through a [YAML](https://yaml.org/) file called `harper-config.yaml` located in the Harper root directory. By default the root directory is a folder named `hdb` in the home directory of the current user.

:::note Instances upgraded from v4
Before v5 this file was named `harperdb-config.yaml`, and that name is still supported. Harper looks for `harper-config.yaml` first and falls back to `harperdb-config.yaml` when only the older file is present, then writes later changes — including those made by `set_configuration` — back to whichever file it found. Upgrading does not rename the file, so an upgraded instance keeps its `harperdb-config.yaml` until you rename it. A fresh install always creates `harper-config.yaml`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overstates the resolver behavior. A normal installed node follows the exact settings_path recorded in its boot properties; the new-name-first directory lookup applies only when Harper is launched with a root-path override. Consequently, a v4-upgraded node can remain pointed at harperdb-config.yaml, and merely renaming it or creating harper-config.yaml does not update that pointer. If both files exist, startup and configuration writes can even select different files. This makes reference/mcp/migration.md:32 a concrete failure case: adding the MCP block to the newly named file may leave MCP disabled because the process still reads the legacy file. Please document how to identify/edit the active file and how to coordinate a rename with settings_path, or consolidate the resolution behavior in Harper core before promising this precedence here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right on all four points, and I confirmed each against origin/main before changing anything:

  • configUtils.ts getConfigFilePath does the new-name-first lookup inside if (cmdArgs), where cmdArgs is getEnvCliRootPath() — so it only applies under ROOTPATH / --ROOTPATH. With neither set it returns the literal settings_path.
  • installer.ts writes settings_path only on a fresh install; it exits early when either config file already exists, and nothing in upgrade/ repoints it. So an upgraded node keeps naming harperdb-config.yaml, and renaming the file breaks startup rather than migrating it.
  • setConfigValue resolves the file by its own rootPath directory lookup that prefers the new name unconditionally, so with both files present startup and configuration writes can genuinely diverge.

I've rewritten the note around settings_path as the thing that actually selects the file and dropped the precedence claim (f050b62). It now says the active file is whatever settings_path names, that an upgraded instance usually still names harperdb-config.yaml, that upgrading neither renames the file nor repoints settings_path — so a rename has to update both — and to avoid leaving both files in the root at once.

What I have not done here is the fuller thing you asked for: a proper section on identifying and editing the active file, and coordinating a rename. I'd rather do that as a follow-up, and I think the prior question is yours: whether getConfigFilePath and setConfigValue should agree in core, since documenting the current divergence and then changing it is wasted work in both directions. Happy to write it either way once you've called that.

One scoping note on mcp/migration.md:32. That failure mode is real, but it isn't specific to this PR or to MCP — roughly 40 occurrences of harper-config.yaml already sit on pages this PR doesn't touch (configuration/options.md, security/configuration.md, http/*, models/*, operations-api/*). This PR brought 5 stragglers into line with those. MCP is just where you happened to catch it, so I'd rather not hold the consistency fix on it — but if you'd like every "set X in harper-config.yaml" instruction to point at the overview note instead of naming a filename, that's a reasonable docs-wide pass and I'll file it with the follow-up.

sent with Claude Opus 5

The note claimed Harper looks for `harper-config.yaml` first and falls
back to `harperdb-config.yaml`, then writes later changes back to
whichever file it found. That describes only the root-path override path.

`configUtils.ts` getConfigFilePath does the new-name-first lookup inside
`if (cmdArgs)`, where `cmdArgs` is `getEnvCliRootPath()` — a `ROOTPATH`
environment variable or `--ROOTPATH` argument. With neither set, which is
the normal installed case, it returns the literal `settings_path` from the
boot properties file. `installer.ts` writes `settings_path` only on a fresh
install (it exits early when either config file already exists), and
nothing in `upgrade/` repoints it, so an upgraded node keeps naming
`harperdb-config.yaml`. Renaming the file therefore breaks startup rather
than migrating it, and because setConfigValue resolves the file by its own
directory lookup that prefers the new name, leaving both files present can
send startup and configuration writes to different files.

Rewrites the note around `settings_path` as the thing that actually
selects the file, and drops the precedence claim.

Reported by @kriszyp in review.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions
github-actions Bot temporarily deployed to pr-661 September 2, 2026 18:59 Inactive
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-661

This preview will update automatically when you push new commits.

@Ethan-Arrowood
Ethan-Arrowood merged commit d895f42 into main Sep 2, 2026
10 checks passed
@Ethan-Arrowood
Ethan-Arrowood deleted the docs/v5-config-filename branch September 2, 2026 19:05
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🧹 Preview Cleanup

The preview deployment for this PR has been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants